package com.lagou.controller;

import com.alibaba.druid.stat.TableStat;
import com.lagou.domain.Department;
import com.lagou.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/department")
public class DepartmentController {


    @Autowired
    private DepartmentService departmentService;


    @RequestMapping("/findById")
    @ResponseBody
    public Department findById(Integer id){

        return departmentService.findById(id);
    }
}
